
#ifndef BBINPUT_BA4A8533_812C_4D2B_82B1_FBC671CFA3CB
#define BBINPUT_BA4A8533_812C_4D2B_82B1_FBC671CFA3CB

#include "bbCFG.h"

class bbInpt
{
private:
	bool bb_ReadKeyboard();
	bool bb_ReadMouse();
	void bb_ProcessInput();

	/* private region */
	IDirectInput8* m_directInput;		//direct device
	IDirectInputDevice8* m_keyboard;	//keyboard
	IDirectInputDevice8* m_mouse;		//mouse

	unsigned char m_keyboardState[256];	//key pressed buffer
	DIMOUSESTATE m_mouseState;			//mouse state struct

	int m_screenWidth, m_screenHeight;	//screen width / height
	int m_mouseX, m_mouseY;				//mouse x / y
	/*------------------------TEMP VARS------------------------------*/
	HINSTANCE hinstance;				//hInst of app
	HWND hwnd;							//hwnd of window
public:
	bbInpt(HWND target = NULL, int width = 100, int heigth = 100);
	~bbInpt();

	bool bb_InitInput();
	bool bb_UpdateInput();

	bool bb_IsKeyPressed(DWORD keyConst);
	void bb_GetMousePos(int &x, int &y);
};

#endif // BBINPUT_BA4A8533_812C_4D2B_82B1_FBC671CFA3CB
